﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Framework.UnitOfWork;

namespace Framework.Bus
{
    public interface IBus<TMessage> : IDisposable
    {
        void Commit();
        void Send(TMessage message, Action<dynamic> beforeCommitAction = null);
        void Send(IEnumerable<TMessage> messages);
        void Post(TMessage message, Action<dynamic> beforeCommitAction = null);
        void Post(IEnumerable<TMessage> messages);
    }
}
